package cn.bookcycle.requestroom.pojo;

/**
 * 用户看房的权限实体
 *
 * @author liufenglin
 * @date 2018年3月4日
 */
public class Authorization {
	/** 用户ID */
	private String userId;
	
	/** 房间ID */
	private String roomId;
	
	/** 开始时间，精确到秒，例如：201802011850 */
	private String date;
	
	/** 持续时间，精确到分钟，单位分钟 */
	private int duration;
	
	public Authorization(String userId, String roomId, DateRecord dateRecord) {
		this.userId = userId;
		this.roomId = roomId;
		this.date = dateRecord.getStartDate();
		this.duration = dateRecord.getDuration();
	}

	public String getUserId() {
		return userId;
	}

	public String getRoomId() {
		return roomId;
	}

	public String getDate() {
		return date;
	}

	public int getDuration() {
		return duration;
	}
	
}
